package com.ca.ridersclubapplication.data.entity;

import java.util.ArrayList;
import java.util.List;

public class ListEntity<T extends Handleable> implements Handleable {

    private final String key;
    private final List<T> list;

    public ListEntity(String key, List<T> list) {
        this.key = key;
        this.list = list == null ? new ArrayList<>() : list;
    }

    public List<T> getList() {
        return list;
    }

    @Override
    public String getKey() {
        return key;
    }
}
